import turtle

turtle.setup(600, 300)
turtle.screensize(200, 100)
turtle.bgcolor("yellow")

turtle.shape("arrow")
turtle.fd(200)

turtle.clear()

turtle.penup()
turtle.back(200)
turtle.pendown()

# 画正方形
turtle.shape("turtle")
turtle.fillcolor("#78a355")
turtle.begin_fill()

for item in range(4):
  turtle.fd(100)
  turtle.lt(90)

turtle.end_fill()
turtle.ht()

# 画棒棒糖
turtle.clear()

turtle.penup()
turtle.goto(-2, -50)
turtle.pendown()
turtle.pensize(5)
turtle.shape("classic")
turtle.color("pink")
turtle.left(90)
turtle.fd(50)

turtle.penup()
turtle.fd(60)

x = turtle.xcor()

''' r = 10

turtle.penup()
turtle.setx(x + r)
pos = turtle.position()
print("position: %d", pos)
turtle.pendown()
turtle.circle(r)


r = 20

turtle.penup()
turtle.setx(x + r)
pos = turtle.position()
print("position: %d", pos)
turtle.pendown()
turtle.circle(r) '''


for k in range(4):
  r = 10 + k * 10

  turtle.penup()
  turtle.setx(x + r)

  turtle.pendown()
  turtle.circle(r)

turtle.ht()
turtle.clear()

# 绘制笑脸
turtle.reset()

turtle.penup()
turtle.bk(30)
turtle.pendown()
turtle.dot(6, "#333")

turtle.penup()
turtle.fd(60)
turtle.pendown()
turtle.dot(6, "#333")

turtle.penup()
turtle.setx(60)
turtle.left(90)
turtle.pendown()
turtle.circle(60)

turtle.penup()
turtle.setpos(4, -30)
turtle.pendown()
turtle.circle(4)

turtle.ht()
                                                                                                                                                                                                                                                               
